POV-Ray : Newsgroups : povray.general : Disc which is not flat : Re: Disc which is not flat Server Time
7 Aug 2024 09:20:48 EDT (-0400)
  Re: Disc which is not flat  
From: Warp
Date: 2 Dec 2001 17:21:34
Message: <3c0aa96d@news.povray.org>
Dave Dunn <poi### [at] aolcom> wrote:
: As a prograamer you may be horrified that I want the program to make
: it easier for me to do something, but as a user, I want it as efficient as I can
: get it.

  Suppose that you have a #while-loop where you are creating copies of the
same object scaled thinner and thinner in one axis. However, you make a small
mistake and forget that scaling by 0 is not possible, and you have one of
those copies scaled by 0 in that axis.
  So what you get is a series of objects scaled thinner and thinner and
thinner and... What? One of the objects is not scaled! What happened here?
Is there a bug in POV-Ray?
  Now, if you look at the message window and see the warning, you immediately
realize that "oops! true, I forgot to take into account the scale-by-0 case".
  However, if there is no warning, you may not see what is wrong there!

  In my opinion it shouldn't even be a warning, but a plain error. It would
stop this kind of mistakes immediately.
  Understand better now?

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.